import random
l=[]
l2=[]
right=0
for i in range(8):
    num=random.randint(1,33)
    l.append(num)
for i in range(1,9):
    num2=eval(input("请输入第{}位号码".format(i)))
    l2.append(num2)

for j in  l:
    for k in l2:
        if(j==k):
            ++right
print("中了{}个数字".format(right))
print("本期中奖号码为：")
for i in l:
    print(i,end=",")

if right==8:
    print("一等奖")
elif right==7:
    print("二等奖")
elif right==6:
    print("三等奖")
elif right==5:
    print("四等奖")
else:print("未中奖")
